package com.qf.wangqing.sportsnews.utils;

import android.databinding.BindingAdapter;
import android.widget.ImageView;

import com.qf.wangqing.sportsnews.bean.cornpetition.CircleTransformation;
import com.squareup.picasso.Picasso;

/**
 * Created by WangQing on 2016/12/20.
 */

public class SlidingBinding {
    @BindingAdapter("loadCircle")
    public static void getCircleImage(ImageView view, String url){
        Picasso.with(view.getContext())
                .load(url)
                .transform(new CircleTransformation())
                .into(view);
    }

    public static void getMoreImgs(ImageView view,String url){
        Picasso.with(view.getContext())
                .load("http://roi.skst.cn/"+url+"!bigger")
                .into(view);
    }
}
